package com.sike.javacore.serializer.singleton;

import java.io.Serializable;

public class SerializableSingleton implements Serializable {
    private SerializableSingleton(){}

    private static class SingletonInstance{
        private static final SerializableSingleton instance = new SerializableSingleton();
    }

    public static SerializableSingleton getInstance(){
        return SingletonInstance.instance;
    }

    private Object readResolve() {
        return SingletonInstance.instance;
    }
}
